/* Layout */
.container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fb;
}

.header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #ececec;
  background: #fff;
  font-weight: 600;
  gap: 8px;
}

.headerTitle { flex: 1; }

.headerBtn {
  font-size: 20px;
}

.headerBtn2{
  font-size: 14px;
  color: #1677ff;
  border: solid 1px #ccc;
  padding: 5px 10px;
  border-radius: 5px;
}

.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
}

.inner {
  max-width: 820px;
  margin: 0 auto;
}

.emptyHint {
  color: #666;
  text-align: center;
  padding: 12px 0;
}

/* Messages */
.msgRow {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.msgRow:first-child {
  margin-top: 0;
}

.msgRowUser {
  justify-content: flex-end;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1677ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

.avatarUser {
  background: #222;
}

.bubble {
  max-width: 78%;
  white-space: pre-wrap;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  padding: 10px 12px;
  display: inline-block;
  word-break: break-word;
}

.bubbleUser {
  background: #1677ff;
  color: #fff;
}

.bubbleAssistant {
  background: #fff;
  color: #222;
}

/* Footer */
.footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #ececec;
}

.footerInner {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px;
}

.statusBar {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #fff7e6;
  border: 1px solid #ffe7ba;
  color: #ad6800;
  border-radius: 8px;
  font-size: 12px;
}

.attachList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.attachItem {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fafafa;
}

.thumbImg {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

.thumbFile {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #e8e8ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #555;
}

.meta {
  max-width: 300px;
  font-size: 12px;
  color: #333;
}

.removeBtn {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  padding: 2px 6px;
}

.inputBar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.micBtn,
.plusBtn {
  /* width: 44px; */
  /* height: 44px; */
  border-radius: 50%;
  /* border: 1px solid #ddd; */
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  transition: transform 360ms ease;
}

.plusOpen { transform: rotate(45deg); }

.sendBtn {
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #1677ff;
  background: #1677ff;
  color: #fff;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

.sendBtn:disabled {
  background: #a0c5ff;
  cursor: not-allowed;
}

.textArea {
  flex: 1;
  height: 44px;
  max-height: 160px;
  resize: none;
  padding: 10px 14px;
  line-height: 24px;
  border-radius: 22px;
  border: 1px solid #ddd;
  outline: none;
  box-sizing: border-box;
  text-align: left;
}

.expand {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 500ms ease, opacity 400ms ease, transform 400ms ease, border-color 300ms ease, margin-top 300ms ease, padding-top 300ms ease;
}

.expandOpen {
  margin-top: 10px;
  padding-top: 10px;
  border-top-color: #eee;
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.gridBtn {
  height: 26px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
}

.emojiGrid {
  margin-top: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

.emojiBtn {
  font-size: 16px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hiddenInput { display: none; }

/* Voice panel */
.voicePanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.voiceRoundBtn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #1677ff;
  background: #e6f0ff;
  color: #1677ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

